<?php
/**
 * Created by PhpStorm.
 * User: 小蛮哼哼哼
 * Email: 243194993@qq.com
 * Date: {2021/1/7}
 * Time: {12:55}
 * motto: 现在的努力是为了小时候吹过的牛逼！
 */

namespace app\common\lib;


class Show
{
    /**
     * @param int $code
     * @param string $message
     * @param null $data
     * @param int $httpStatus
     * @return \think\response\Json
     */
    public static function json_show(int $code, string $message, $data = null, int $httpStatus = 200): \think\response\Json
    {
        $result = [
            "code" => $code,
            "message" => $message,
            "result" => $data
        ];
        return json($result, $httpStatus);
    }
}